<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <script src="vue/vue.js" charset="utf-8"></script>

</head>
<body>
<div id="box">
    <input type="text" @keyup.enter="show()">
</div>

<script >
    new Vue({
        el: '#box',
        data: {},
        methods: {
            show: function () {
                    alert('你按了回车键！')
            }
        }
    });

</script>
</body>
</html>